package com.slz3.business.module.afterSaleManagement.aftWorkOrder.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.afterSaleManagement.aftWorkOrder.domain.AftWorkOrder;
import com.slz3.business.module.afterSaleManagement.aftWorkOrder.domain.AftWorkOrderCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class AftWorkOrderResAtomic extends AftWorkOrderResExecutor {

    public Mono<ServerResponse> add_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrder aftWorkOrder) {
        return AftWorkOrderResSafeValid.add(req, aftWorkOrder) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, aftWorkOrder);
    }

    public Mono<ServerResponse> delete_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.delete(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrder aftWorkOrder) {
        return AftWorkOrderResSafeValid.modify(req, aftWorkOrder) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, aftWorkOrder);
    }

    public Mono<ServerResponse> info_$AftWorkOrderUpdateLock(ServerRequest req) {
        return AftWorkOrderResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.auditSubmit(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.audit(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.auditReject(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.usingEnable(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$AftWorkOrderUpdateLock(ServerRequest req, AftWorkOrderCondition aftWorkOrderCondition) {
        return AftWorkOrderResSafeValid.usingDisable(req, aftWorkOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
